﻿@model IEnumerable<indicadores.Models.Login>
@{
    ViewBag.Title = "Listar";
    Layout = "~/Views/Shared/Layout.cshtml";
}
@section SubMenu{
    @RenderPage("~/Views/Login/SubMenu.cshtml")
}
<table>
    <tr>
        <th>
            Nome
        </th>
        <th>
            Usuario
        </th>
        <th>
            Acesso
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Nome)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Usuario)
            </td>
            @if (Html.DisplayFor(modelItem => item.Acesso).ToString() == "1")
            {
                <td>
                    Administrador
                </td>
            }
            @if (Html.DisplayFor(modelItem => item.Acesso).ToString() == "0")
            {
                <td>
                    Usuário Comum
                </td>
            }
            <td>
                @Html.ActionLink("Alterar", "Altera", new { id = item.Id }) |
                @Html.ActionLink("Detalhes", "Detalhe", new { id = item.Id }) |
                @Html.ActionLink("Apagar", "Apagar", new { id = item.Id })
            </td>
        </tr>
    }
</table>
